<?php

namespace App\Http\Controllers;

use App\Services\Calculation\CalculationServices;

class BMIController extends BaseController
{
    /**
     * 碳循环饮食算法
     * @return \Illuminate\Http\JsonResponse
     */
    public function quantityOfHeat()
    {
        $weight = 100;//$this->verifyInteger('weight');
        $height = 183;//$this->verifyInteger("height");
        $age = 24;//$this->verifyInteger('age');
        $bodyFatRatio = 0.25;//$this->verifyInteger('bodyFatRatio');
        $sex = 1;//$this->verifyInteger('sex',1);
        $type = 2;//$this->verifyInteger('type',1);
        $strength = 'bodybuilding';//$this->verifyString('strength');
        $data = CalculationServices::getInstance()->calculation($weight, $height, $age, $bodyFatRatio, $strength, $sex, $type);
//        dd($data);
        return $this->success($data);
    }
}
